home *** CD-ROM | disk | FTP | other *** search
-
- Free Information Xchange '98 presents:
-
- Hardcore 4x4 - CD crack by Static Vengeance - Aug 19, 1998
-
- Requirements:
- Hex editor and full game install
- W32Dasm if you wish to follow along
-
- Hardcore 4x4 is touted as "4x4 off-road racing at its roughest" Also this program from Gremlin
- has built in support for PowerVR and 3Dfx cards. As such I thought I would try the game out.
- Also I was hoping for some type of CD check so I had another type of "game" to play. This way I
- could also write up another CD cracking tutorial for you to read. The fact that you're reading this means
- I found a CD check and found a way around it as well.
- The first thing I did was to install the game and run it without the CD. Right away the game
- came up and asked for the CD. However this wasn't done through a simple Windows 95 pop-up dialog box,
- instead there was a graphics that popped up from within the game. This means if you disassemble the
- program with W32Dasm you cannot just search for something like "Please insert..." or other simular dialogs.
- So the next best method is to use the text search function and search for GetDriveTypeA witch is a
- KERNEL32.dll call often used in CD checks. If you do this you will eventualy find this routine:
-
- * Referenced by a CALL at Addresses:
- |:004477A5 , :00450CF1 , :0045A486 , :0045A50A , :0045D8DB <-- Called from five locations
- |
- :0045D7A0 53 push ebx
- :0045D7A1 51 push ecx
- :0045D7A2 52 push edx
- :0045D7A3 56 push esi
- :0045D7A4 57 push edi
- :0045D7A5 55 push ebp
- :0045D7A6 83EC08 sub esp, 00000008
- :0045D7A9 31D2 xor edx, edx <-- Zero out edx
- :0045D7AB 31DB xor ebx, ebx <-- ebx is used for CD check count
- :0045D7AD 8915F8926200 mov dword ptr [006292F8], edx <-- Force a fail value in CD check flag
-
- * Reference To: KERNEL32.GetLogicalDrives, Ord:000Eh <-- Often used in CD checks
- |
- :0045D7B3 2EFF1550046500 Call dword ptr cs:[00650450]
- :0045D7BA 89C6 mov esi, eax
- :0045D7BC BFFC926200 mov edi, 006292FC
- :0045D7C1 BD01000000 mov ebp, 00000001 <-- Preload pass value in ebp
- :0045D7C6 EB17 jmp 0045D7DF <-- Jump over the deleting of dummy file
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Address:
- |:0045D868(C)
- |
- :0045D7C8 E81AAD0000 call 004684E7
- :0045D7CD 57 push edi
-
- * Reference To: KERNEL32.DeleteFileA, Ord:0005h <-- Delete the "gdv\dummy.txt" file
- |
- :0045D7CE 2EFF152C046500 Call dword ptr cs:[0065042C]
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
- |:0045D7EA(C), :0045D812(C), :0045D81B(C), :0045D840(C), :0045D874(U)
- |
- :0045D7D5 43 inc ebx <-- Increase CD check count
- :0045D7D6 83FB20 cmp ebx, 00000020 <-- Min number of tries for CD check
- :0045D7D9 0F8D9A000000 jnl 0045D879 <-- Take this jump to exit
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Address:
- |:0045D7C6(U)
- |
- :0045D7DF B801000000 mov eax, 00000001
- :0045D7E4 88D9 mov cl, bl
- :0045D7E6 D3E0 shl eax, cl
- :0045D7E8 85C6 test esi, eax
- :0045D7EA 74E9 je 0045D7D5
-
- * Possible StringData Ref from Data Obj ->"A:\" <-- Look for "A:\" or "C:\"
- |
- :0045D7EC 68BF214800 push 004821BF
- :0045D7F1 8D442404 lea eax, dword ptr [esp+04]
- :0045D7F5 50 push eax
- :0045D7F6 E8DE980000 call 004670D9
- :0045D7FB 88D8 mov al, bl
- :0045D7FD 83C408 add esp, 00000008
- :0045D800 0441 add al, 41
- :0045D802 880424 mov byte ptr [esp], al
- :0045D805 89E0 mov eax, esp
- :0045D807 50 push eax
-
- * Reference To: KERNEL32.GetDriveTypeA, Ord:000Bh <-- Commonly used in CD checks
- |
- :0045D808 2EFF1544046500 Call dword ptr cs:[00650444]
- :0045D80F 83F805 cmp eax, 00000005 <-- 05 is the value for a CD rom drive
- :0045D812 75C1 jne 0045D7D5 <-- No CD rom drive them exit
- :0045D814 833DF892620000 cmp dword ptr [006292F8], 00000000 <-- Compare zero against CD check flag
- :0045D81B 75B8 jne 0045D7D5
-
- * Possible StringData Ref from Data Obj ->"gdv\finalds.gdv" <-- File to check for on the CD
- |
- :0045D81D 68C3214800 push 004821C3
- :0045D822 8D442404 lea eax, dword ptr [esp+04]
- :0045D826 50 push eax
-
- * Possible StringData Ref from Data Obj ->"%s%s"
- |
- :0045D827 68D3214800 push 004821D3
- :0045D82C 57 push edi
- :0045D82D E8A7980000 call 004670D9
- :0045D832 83C410 add esp, 00000010
- :0045D835 57 push edi
-
- * Reference To: KERNEL32.GetFileAttributesA, Ord:000Ch
- |
- :0045D836 2EFF1548046500 Call dword ptr cs:[00650448]
- :0045D83D 83F8FF cmp eax, FFFFFFFF
- :0045D840 7493 je 0045D7D5
-
- * Possible StringData Ref from Data Obj ->"gdv\dummy.txt" <-- Make a file on the "CD"
- |
- :0045D842 68D8214800 push 004821D8
- :0045D847 8D442404 lea eax, dword ptr [esp+04]
- :0045D84B 50 push eax
-
- * Possible StringData Ref from Data Obj ->"%s%s"
- |
- :0045D84C 68E6214800 push 004821E6
- :0045D851 57 push edi
- :0045D852 E882980000 call 004670D9
- :0045D857 83C410 add esp, 00000010
-
- * Possible StringData Ref from Data Obj ->"w" <-- Try to write to the CD?
- |
- :0045D85A BAEB214800 mov edx, 004821EB
- :0045D85F 89F8 mov eax, edi
- :0045D861 E895AB0000 call 004683FB
- :0045D866 85C0 test eax, eax
- :0045D868 0F855AFFFFFF jne 0045D7C8 <-- Take this jump to delete the dummy file
- :0045D86E 892DF8926200 mov dword ptr [006292F8], ebp <-- Store pass value in CD check flag
- :0045D874 E95CFFFFFF jmp 0045D7D5 <-- Increase CD check count
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Address:
- |:0045D7D9(C)
- |
- :0045D879 A1F8926200 mov eax, dword ptr [006292F8] <-- Load the pass/fail flag
- :0045D87E 83C408 add esp, 00000008 <-- Get here with eax=01 for passed check
- :0045D881 5D pop ebp
- :0045D882 5F pop edi
- :0045D883 5E pop esi
- :0045D884 5A pop edx
- :0045D885 59 pop ecx
- :0045D886 5B pop ebx
- :0045D887 C3 ret <-- Return to the caller: eax=01 for pass or eax=00 for fail
-
-
- :0045D888 0000000000000000 BYTE 8 DUP(0)
-
- A simple way to bypass the CD is to load eax with 00000001 and jump down to 45D87E. This is easy
- to do and can be implemented at 45D7BC. Change the mov edi, 006292FC to mov eax, 00000001 and then change
- the mov ebp, 00000001 at 45D7C1 to jmp 0045D881. Now when run, the CD check will do the KERNEL32 call
- GetLogicalDrives and then load a pass value in eax and jump down to the return code. This way all five
- known calls (and any others) will return with the correct value for a passed CD check. To make this crack
- simply make the following edits:
-
- Edit 4x4.exe at offset 318,396
- ================================
- Search for: BF FC 92 62 00 BD 01
- Change to : B8 01 00 00 00 E9 B8
-
- Or, if you like, you can kill all five calls to the CD check (which is the method I prefer) with
- the following edits:
-
- Edit 4x4.exe
- =============================================
- Search for: E8 F6 5F 01 00 at offset 228,261
- Change to : B8 01 00 00 00
-
- Search for: E8 AA CA 00 00 at offset 266,481
- Change to : B8 01 00 00 00
-
- Search for: E8 15 33 00 00 at offset 305,286
- Change to : B8 01 00 00 00
-
- Search for: E8 91 32 00 00 at offset 305,418
- Change to : B8 01 00 00 00
-
- Search for: E8 C0 FE FF FF at offset 318,683
- Change to : B8 01 00 00 00
-
- There you have two different ways to crack the same program. You now have another example of how
- to remove (or bypass) a CD check. I hope you have learned something from my efforts with Hardcare 4x4 and
- my other tutorials.
-
- Static Vengeance
-